package edu.uwm.universitydb.controller;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JButton;
import javax.swing.JPasswordField;

import edu.uwm.universitydb.view.Login; 

public class LoginController implements MouseListener {

	public LoginController() {
		// Create our associated view
		_view = new Login();
	}
	
	public Login getView() {
		return _view;
	}
	
	public JButton getSignInButton() {
		return _view.getSigninButton();
	}
	
	public JPasswordField getPasswordField() {
		return _view.getPasswordField();
	}
	
	@Override
	public void mouseClicked(MouseEvent e) {
		//Based on the element clicked, fire off appropriate handler method.
		switch(e.getComponent().getName()) {
			default: 
				//Not sure what they clicked, do nothing
				break;
		}
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// Unused		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// Unused
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// Unused
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// Unused
	}	
	
	private Login _view;
	public static final String ID = "loginID";
}
